package material.command.receiver_命令接收者;

/**
 * 电视
 */
public class TV {
    String location;//电视位置
    int channel;//电视播放的频道

    public TV(String location) {
        this.location = location;
    }

    /**
     * 开电视
     */
    public void on() {
        System.out.println(location + " 电视已打开");
    }

    public void off() {
        System.out.println(location + " 电视已关闭");
    }

    /**
     * 设置输入源
     */
    public void setInputChannel() {
        this.channel = 3;
        System.out.println(location + " 电视频道输入源设置为DVD");
    }
}
